package com.sg.controller.pbff;

import com.sg.service.biz.pbff.PlfAuthService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "PlfAuth", tags = {"PlfAuth"})
@RestController
// @RequestMapping("/poms/plfAuth/")
public class PlfAuthController {
    @Autowired
    PlfAuthService plfAuthService;

    /**
     * B1-1查询角色授权列表（平台）
     * gen by moon at 8/20/2022, 6:00:11 PM
     */
    @PostMapping("/oms/platform/plfAuth/queryPltRoleAuthList")
    @ApiOperation(value = "B1-1查询角色授权列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryPltRoleAuthListRespDto> queryPltRoleAuthList(@RequestBody(required = false) @Validated BffQueryPltRoleAuthListReqDto reqDTO) {
        return OkrResult.success(plfAuthService.queryPltRoleAuthList(reqDTO));
    }

    /**
     * B1-2查询可授权权限列表（平台）
     * gen by moon at 8/10/2022, 3:43:01 AM
     */
    @PostMapping("/oms/platform/plfAuth/queryFilterPltPowerAuthList")
    @ApiOperation(value = "B1-2查询可授权权限列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryFilterPltPowerAuthListRespDto> queryFilterPltPowerAuthList(@RequestBody(required = false) @Validated BffQueryFilterPltPowerAuthListReqDto reqDTO) {
        return OkrResult.success(plfAuthService.queryFilterPltPowerAuthList(reqDTO));
    }

    /**
     * B1-2查询可授权角色列表（平台）
     * gen by moon at 8/10/2022, 2:36:32 PM
     */
    @PostMapping("/oms/platform/plfAuth/queryFilterPltRoleAuthList")
    @ApiOperation(value = "B1-2查询可授权角色列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryFilterPltRoleAuthListRespDto> queryFilterPltRoleAuthList(@RequestBody(required = false) @Validated BffQueryFilterPltRoleAuthListReqDto reqDTO) {
        return OkrResult.success(plfAuthService.queryFilterPltRoleAuthList(reqDTO));
    }

    /**
     * B1-1新增权限授权（平台）
     * gen by moon at 8/10/2022, 3:40:44 AM
     */
    @PostMapping("/oms/platform/plfAuth/addPlfPowerAuth")
    @ApiOperation(value = "B1-1新增权限授权（平台）", response = OkrResult.class)
    public OkrResult<BffAddPlfPowerAuthRespDto> addPlfPowerAuth(@RequestBody(required = false) @Validated BffAddPlfPowerAuthReqDto reqDTO) {
        return OkrResult.success(plfAuthService.addPlfPowerAuth(reqDTO));
    }

    /**
     * B1-1查询权限授权详情（平台）
     * gen by moon at 8/10/2022, 3:40:42 AM
     */
    @PostMapping("/oms/platform/plfAuth/queryPlfPowerAuthDetail")
    @ApiOperation(value = "B1-1查询权限授权详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryPlfPowerAuthDetailRespDto> queryPlfPowerAuthDetail(@RequestBody(required = false) @Validated BffQueryPlfPowerAuthDetailReqDto reqDTO) {
        return OkrResult.success(plfAuthService.queryPlfPowerAuthDetail(reqDTO));
    }

    /**
     * B1-1查询权限授权列表（平台）
     * gen by moon at 8/20/2022, 6:00:12 PM
     */
    @PostMapping("/oms/platform/plfAuth/queryPlfPowerAuthList")
    @ApiOperation(value = "B1-1查询权限授权列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryPlfPowerAuthListRespDto> queryPlfPowerAuthList(@RequestBody(required = false) @Validated BffQueryPlfPowerAuthListReqDto reqDTO) {
        return OkrResult.success(plfAuthService.queryPlfPowerAuthList(reqDTO));
    }

    /**
     * B1-1存档角色授权（平台）
     * gen by moon at 8/30/2022, 12:00:58 AM
     */
    @PostMapping("/oms/platform/plfAuth/archivePltRoleAuth")
    @ApiOperation(value = "B1-1存档角色授权（平台）", response = OkrResult.class)
    public OkrResult<BffArchivePltRoleAuthRespDto> archivePltRoleAuth(@RequestBody(required = false) @Validated BffArchivePltRoleAuthReqDto reqDTO) {
        return OkrResult.success(plfAuthService.archivePltRoleAuth(reqDTO));
    }

    /**
     * B1-1新增角色授权（平台）
     * gen by moon at 8/10/2022, 3:40:38 AM
     */
    @PostMapping("/oms/platform/plfAuth/addPltRoleAuth")
    @ApiOperation(value = "B1-1新增角色授权（平台）", response = OkrResult.class)
    public OkrResult<BffAddPltRoleAuthRespDto> addPltRoleAuth(@RequestBody(required = false) @Validated BffAddPltRoleAuthReqDto reqDTO) {
        return OkrResult.success(plfAuthService.addPltRoleAuth(reqDTO));
    }

    /**
     * B1-1查询角色授权详情（平台）
     * gen by moon at 8/10/2022, 3:40:37 AM
     */
    @PostMapping("/oms/platform/plfAuth/queryPltRoleAuthDetail")
    @ApiOperation(value = "B1-1查询角色授权详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryPltRoleAuthDetailRespDto> queryPltRoleAuthDetail(@RequestBody(required = false) @Validated BffQueryPltRoleAuthDetailReqDto reqDTO) {
        return OkrResult.success(plfAuthService.queryPltRoleAuthDetail(reqDTO));
    }

}

